// pages/photo/sinResult/sinResult.js
const app = getApp()
var base_url = app.globalData.url
Page({

  /**
   * 页面的初始数据
   */
  data: {
    x: 20,
    y: 95,
    x2: 215,
    y2: 95,
    display:'none',
    newP:'block',
    h2:120,
    w2:120,
    ddis:'none',
    getd:'block',
    dotP: "none"
  },
  
  start: function (e) {
    var that = this
    var animation = wx.createAnimation({})
    
    animation.translate(110, 60).scale(1.6).step({ duration: 2000 })
    this.setData({ scaleData: animation.export() })
    var animation2 = wx.createAnimation({})

    animation2.translate(-90, 60).scale(1.6).step({ duration: 2000 })
    this.setData({ scaleData2: animation2.export() })

    setInterval(function () {
      that.setData({
        // pic: that.data.dataDic['otherpic'],
        display: 'block',
        getd:'none',
        ddis: 'block',
        h2:200,
        w2:200,
        dot:"none",
        dotP:"block"
      })
    }, 2000)
    that.setData({
      
    })

    // that.setData({
    //   newP: 'none',
    //   x: 50,
    //   y: 80,
    //   x2: 50,
    //   y2: 80,
    //   h2: 250,
    //   w2: 250,
    // })
    // setInterval(function () {
    //   that.setData({
    //     pic: that.data.dataDic['otherpic'],
    //     display: 'block',
    //     ddis: 'block',
    //   })
    // }, 2000)
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var that = this
    wx.getSystemInfo({

      success: function (res) {
        let clientHeight = res.windowHeight;
        let clientWidth = res.windowWidth;
        let ratio = 750 / clientWidth;
        let height = clientHeight * ratio;
        that.setData({
          height: clientHeight,
          resH: clientWidth*0.94,
          resH1: 366 * 0.94
        });
      }
    });
    wx.getStorage({
      key: 'dataDic',
      success: function (resl) {
        that.setData({
          dataDic: resl.data,
          pic: resl.data['newpic'],
          respic: resl.data['otherpic'],
          info:resl.data["info"]
        })
      },
      

    })

  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})